//package com.inspur.edp.udt.generator.api.typeprocessers.datareaders;
//
//import com.inspur.edp.udt.designtime.api.entity.element.UdtElement;
//import com.inspur.edp.udt.generator.UdtGeneratorContext;
//
////      生成代码例子
////     public class CompanyAssDef
////      {
////          public string ID{get;set;}
////          public string Code{get;set;}
////          public string Name{get;set;}
////      }
////
////      public interface IElementCompany
////      {
////          CompanyAssDef Company{get;set;}
////      }
////
////      public class Test
////      {
////          public void ReadData(CefDataReader reader, ICefData data)
////          {
////              IElementCompany company = data as IElementCompany;
////              var propertyValue =new CompanyAssDef();
////              propertyValue.ID=Convert.ToString( reader.ReadData("ID"));
////              propertyValue.Code=reader.ReadData("Code");
////              propertyValue.Name=reader.ReadData("Name");
////              company.Company =propertyValue;
////          }
////      }
////
//public class UdtAssociationReadDataGenerator extends UdtDataReaderReadDataMethodGenerator
//{
//	private UdtGeneratorContext udtGenCtx;
//	private java.util.HashMap<String, String> propertyAndColumnMapping;
//	private UdtElement element;
//	private String assPropertyName;
//	public UdtAssociationReadDataGenerator(UdtGeneratorContext udtGenCtx, String assPropertyName, java.util.HashMap<String, String> propertyAndColumnMapping, UdtElement element)
//	{
//		this.udtGenCtx = udtGenCtx;
//		this.propertyAndColumnMapping = propertyAndColumnMapping;
//		this.element = element;
//		this.assPropertyName = assPropertyName;
//	}
//
//	private static final String tempData = "tempData";
//	private static final String assPropertyValue = "assPropertyValue";
//
//	@Override
//	protected BlockSyntax BuildMethodBody()
//	{
//		java.util.ArrayList<StatementSyntax> statements = new java.util.ArrayList<StatementSyntax>();
//		//Type assType = GetElementAssType();
//		AddTypeAsStatements(statements);
//		AddCreatePropertyValueStatements(statements);
//		AddSetPropertyValueStatements(statements);
//		AddSetAssPropertyStatements(statements);
//		return SyntaxFactory.Block(statements.toArray(new StatementSyntax[]{}));
//	}
//
//	private void AddTypeAsStatements(java.util.ArrayList<StatementSyntax> statements)
//	{
//		statements.add(SyntaxFactory.LocalDeclarationStatement(SyntaxFactory.VariableDeclaration(TypeUtils.GetTypeSyntax(udtGenCtx.RootDataInterfaceType)).WithVariables(SyntaxFactory.<VariableDeclaratorSyntax>SingletonSeparatedList(SyntaxFactory.VariableDeclarator(SyntaxFactory.Identifier(tempData)).WithInitializer(SyntaxFactory.EqualsValueClause(SyntaxFactory.BinaryExpression(SyntaxKind.AsExpression, SyntaxFactory.IdentifierName("data"), TypeUtils.GetTypeSyntax(udtGenCtx.RootDataInterfaceType))))))));
//	}
//
//	private void AddCreatePropertyValueStatements(java.util.ArrayList<StatementSyntax> statements)
//	{
//		statements.add(SyntaxFactory.LocalDeclarationStatement(SyntaxFactory.VariableDeclaration(SyntaxFactory.IdentifierName("var")).WithVariables(SyntaxFactory.<VariableDeclaratorSyntax>SingletonSeparatedList(SyntaxFactory.VariableDeclarator(SyntaxFactory.Identifier(assPropertyValue)).WithInitializer(SyntaxFactory.EqualsValueClause(SyntaxFactory.ObjectCreationExpression(TypeUtils.ParseGeneratedSyntax(udtGenCtx.ElementAssociationTypes[element.ID].FullName)).WithArgumentList(SyntaxFactory.ArgumentList())))))));
//	}
//
//	private void AddSetPropertyValueStatements(java.util.ArrayList<StatementSyntax> statements)
//	{
////C# TO JAVA CONVERTER TODO TASK: There is no equivalent to implicit typing in Java:
//		for (var item : propertyAndColumnMapping)
//		{
//			statements.add(SyntaxFactory.ExpressionStatement(SyntaxFactory.AssignmentExpression(SyntaxKind.SimpleAssignmentExpression, SyntaxFactory.MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, SyntaxFactory.IdentifierName(assPropertyValue), SyntaxFactory.IdentifierName(item.getKey())), SyntaxFactory.InvocationExpression(SyntaxFactory.MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, TypeUtils.GetTypeSyntax(Convert.class), SyntaxFactory.IdentifierName("ToString"))).WithArgumentList(SyntaxFactory.ArgumentList(SyntaxFactory.<ArgumentSyntax>SingletonSeparatedList(SyntaxFactory.Argument(SyntaxFactory.InvocationExpression(SyntaxFactory.MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, SyntaxFactory.IdentifierName("reader"), SyntaxFactory.IdentifierName("ReadValue"))).WithArgumentList(SyntaxFactory.ArgumentList(SyntaxFactory.<ArgumentSyntax>SingletonSeparatedList(SyntaxFactory.Argument(SyntaxFactory.LiteralExpression(SyntaxKind.StringLiteralExpression, SyntaxFactory.Literal(item.getValue())))))))))))));
//
//			//statements.Add(SyntaxFactory.ExpressionStatement(
//			//    SyntaxFactory.AssignmentExpression(
//			//        SyntaxKind.SimpleAssignmentExpression,
//			//        SyntaxFactory.MemberAccessExpression(
//			//            SyntaxKind.SimpleMemberAccessExpression,
//			//            SyntaxFactory.IdentifierName(assPropertyValue),
//			//            SyntaxFactory.IdentifierName(item.Key)),
//			//        SyntaxFactory.InvocationExpression(
//			//            SyntaxFactory.MemberAccessExpression(
//			//                SyntaxKind.SimpleMemberAccessExpression,
//			//                SyntaxFactory.IdentifierName("reader"),
//			//                SyntaxFactory.IdentifierName("ReadValue")))
//			//        .WithArgumentList(
//			//            SyntaxFactory.ArgumentList(
//			//                SyntaxFactory.SingletonSeparatedList<ArgumentSyntax>(
//			//                    SyntaxFactory.Argument(
//			//                        SyntaxFactory.LiteralExpression(
//			//                            SyntaxKind.StringLiteralExpression,
//			//                            SyntaxFactory.Literal(item.Value)))))))));
//		}
//	}
//
//	private void AddSetAssPropertyStatements(java.util.ArrayList<StatementSyntax> statements)
//	{
//		statements.add(SyntaxFactory.ExpressionStatement(SyntaxFactory.AssignmentExpression(SyntaxKind.SimpleAssignmentExpression, SyntaxFactory.MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, SyntaxFactory.IdentifierName(tempData), SyntaxFactory.IdentifierName(assPropertyName)), SyntaxFactory.IdentifierName(assPropertyValue))));
//	}
//}